/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Telas;

import classes.Usuario;
import java.awt.Color;

/**
 *
 * @author Guilherme
 */
public class TelaPrincipalAdministrador extends javax.swing.JFrame {

    /**
     * Creates new form TelaPrincipalAdministrador
     */
    public TelaPrincipalAdministrador() {
        initComponents();
        getContentPane().setBackground(Color.white);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jButtonHorarios = new javax.swing.JButton();
        jButtonCadastrarUsuario = new javax.swing.JButton();
        jButtonSobre = new javax.swing.JButton();
        jButtonTrocarUsuario = new javax.swing.JButton();
        desktop = new javax.swing.JDesktopPane();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
        jLabel1.setText("BuskAula");

        jButtonHorarios.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/relogio.gif"))); // NOI18N
        jButtonHorarios.setText("Horários");
        jButtonHorarios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonHorariosActionPerformed(evt);
            }
        });

        jButtonCadastrarUsuario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/add.png"))); // NOI18N
        jButtonCadastrarUsuario.setText("Cadastrar Usuário");
        jButtonCadastrarUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonCadastrarUsuarioActionPerformed(evt);
            }
        });

        jButtonSobre.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Exclamacao.png"))); // NOI18N
        jButtonSobre.setText("Sobre");
        jButtonSobre.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSobreActionPerformed(evt);
            }
        });

        jButtonTrocarUsuario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/sair.png"))); // NOI18N
        jButtonTrocarUsuario.setText("Log Out");
        jButtonTrocarUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonTrocarUsuarioActionPerformed(evt);
            }
        });

        desktop.setBackground(new java.awt.Color(0, 153, 255));
        desktop.setPreferredSize(new java.awt.Dimension(657, 355));
        desktop.setLayout(new java.awt.BorderLayout());

        Usuario usuario = new Usuario();
        jLabel2.setText("Logado como: "+usuario.getUsuario());

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(212, 212, 212)
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(693, Short.MAX_VALUE))
            .addComponent(desktop, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jButtonHorarios, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(40, 40, 40)
                .addComponent(jButtonCadastrarUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonTrocarUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(31, 31, 31)
                .addComponent(jButtonSobre)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel2)
                .addGap(44, 44, 44))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonHorarios)
                    .addComponent(jButtonCadastrarUsuario)
                    .addComponent(jButtonTrocarUsuario)
                    .addComponent(jButtonSobre)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(desktop, javax.swing.GroupLayout.DEFAULT_SIZE, 537, Short.MAX_VALUE))
        );

        setSize(new java.awt.Dimension(1168, 719));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonHorariosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonHorariosActionPerformed
        TelaHorarios horario = new TelaHorarios();
        desktop.add(horario);
        horario.setVisible(true);
        horario.setClosable(true);
    }//GEN-LAST:event_jButtonHorariosActionPerformed

    private void jButtonCadastrarUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCadastrarUsuarioActionPerformed
        TelaCadastrarUsuario telacadastrarusuario = new TelaCadastrarUsuario();
        desktop.add(telacadastrarusuario);
        telacadastrarusuario.setVisible(true);
        telacadastrarusuario.setClosable(true);
    }//GEN-LAST:event_jButtonCadastrarUsuarioActionPerformed

    private void jButtonSobreActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSobreActionPerformed
        TelaSobre telasobre = new TelaSobre();
        desktop.add(telasobre);
        telasobre.setVisible(true);
        telasobre.setClosable(true);
    }//GEN-LAST:event_jButtonSobreActionPerformed

    private void jButtonTrocarUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonTrocarUsuarioActionPerformed
         TelaLogin telalogin = new TelaLogin();
         telalogin.setVisible(true);
         dispose();
    }//GEN-LAST:event_jButtonTrocarUsuarioActionPerformed




    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane desktop;
    private javax.swing.JButton jButtonCadastrarUsuario;
    private javax.swing.JButton jButtonHorarios;
    private javax.swing.JButton jButtonSobre;
    private javax.swing.JButton jButtonTrocarUsuario;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    // End of variables declaration//GEN-END:variables
}
